//
//  SearchGoodsRequest.m
//  EasyToo
//
//  Created by zhengzhe on 13-10-13.
//
//

#import "SearchGoodsRequest.h"

@implementation SearchGoodsRequest

- (id)initWithKeyWord:(NSString*)keyword
            PageIndex:(NSInteger)pageIndex
              PageNum:(NSInteger)pageNum
             Delegate:(id<ServerCommunicationDelegate>)delegate
{
    self = [super init];
    if (self) {
        
        self.requestName = @"SearchGoodsRequest";
        self.delegate = delegate;
        
        [self.headerJsonDict setObject:@"888883" forKey:@"TranCode"];
        [self.headerJsonDict setObject:@"20" forKey:@"TxRecordNum"];
        
        [self.bodyJsonDict setObject:[NSNumber numberWithInteger:pageIndex] forKey:@"pageNo"];
        [self.bodyJsonDict setObject:[NSNumber numberWithInteger:pageNum] forKey:@"pageSize"];
        [self.bodyJsonDict setObject:keyword forKey:@"productName"];
        
        
        [self buildJsonRequest];
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

@end
